package org.emet.entity.biz;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.emet.help.CGResource;
import org.emet.jee.console.entity.BaseEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "T_BUSINESS_TEAM")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class BusinessTeam extends BaseEntity {

	@CGResource("编码")
	private String code;
	@CGResource("名称")
	private String name;
	@CGResource("组长")
	private String leader;

	@Column(unique = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(unique = true)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLeader() {
		return leader;
	}

	public void setLeader(String leader) {
		this.leader = leader;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
